using Avalonia;
using Avalonia.Controls;
using Avalonia.Interactivity;
using Avalonia.Markup.Xaml;
using AvaloniaApplication1.ViewModels;

namespace AvaloniaApplication1.Views
{
    public class TestValidWindow : Window
    {
        private IndeiErrorViewModel indeiErrorViewModel = new IndeiErrorViewModel();

        public TestValidWindow()
        {
            InitializeComponent();
            this.DataContext = indeiErrorViewModel;
#if DEBUG
#endif
        }

        private void InitializeComponent()
        {
            AvaloniaXamlLoader.Load(this);
        }

        private void Button_OnClick(object? sender, RoutedEventArgs e)
        {
            this.Title = "";
            this.Title =  indeiErrorViewModel.Value.ToString();
            TextBox txtBox = new TextBox();
            ScrollViewer scrollViewer = new ScrollViewer();
            //SetAndRaise()
            //scrollViewer.RaiseEvent(null);
            scrollViewer.SetValue(ScrollViewer.ExtentProperty, new Size());
            
        }
    }
}
